# models.py
from django.db import models

class User(models.Model):
    user_name = models.CharField(max_length=20, default='匿名用户')
    user_sex = models.CharField(max_length=3, blank=True, null=True)
    user_birth = models.DateField(blank=True, null=True)
    user_phone = models.CharField(max_length=11, blank=True, null=True)

    user_nick = models.CharField(max_length=20)
    user_pwd = models.CharField(max_length=16)
    is_admin = models.BooleanField(default=False)
    position = models.IntegerField(default=0)

class Score(models.Model):
    review_id = models.IntegerField() # models.ForeignKey(User)
    be_review_id = models.IntegerField()
    review_date = models.DateTimeField(auto_now=True)
    be_review_date = models.CharField(max_length=7)

    score_work = models.IntegerField()
    score_quality = models.IntegerField()
    score_skill = models.IntegerField()
    score_attitude = models.IntegerField()

class ScoreDate(models.Model):
    score_date = models.CharField(max_length=7)
    status = models.BooleanField(default=False)

class Advice(models.Model):
    user_id = models.IntegerField()
    review_date = models.DateTimeField(auto_now=True)
    descript  = models.TextField(max_length=1000, blank=True, null=True)
